package com.ceba.test.base.configs;

import com.ceba.base.utils.IPUtils;
import com.ceba.cebautils.StringUtil;
import com.ceba.netty.server.config.NettyServerConstants;

public class NettyServerConfig {

	public static String NETTY_SERVER_IP = "";
	public static String NETTY_SERVER_PORT = "";
	
	static{
		init();
	}
	public static void init() {
		NETTY_SERVER_IP = CebaConfig.get("NETTY_SERVER_IP");
		NETTY_SERVER_PORT = CebaConfig.get("NETTY_SERVER_PORT");
		if(StringUtil.isEmptyString(NETTY_SERVER_IP)){
			NETTY_SERVER_IP = IPUtils.getServerIp();
		}
		if(StringUtil.isEmptyString(NETTY_SERVER_PORT)){
			NETTY_SERVER_PORT = "10029";
		}
		NettyServerConstants.tcpIP = NETTY_SERVER_IP;
		NettyServerConstants.tcpPort = NETTY_SERVER_PORT;
	}

}
